package com.example.sherlockzhong.plush_v2.CardBeans;
/**
 * Created by DosonLeung on 2014/7/30.
 */

import android.widget.ImageView;
import android.widget.TextView;

import com.example.sherlockzhong.plush_v2.R;
import com.example.sherlockzhong.plush_v2.View.CardHorizontalScrollView;

public class NewsCardBean {
    private static int cardId = 5;
    private static String cardClass = "News";
    int news_icon;
    String news_title;
    String news_activity;
    String news_address;
    String news_date;
    String news_deadline;
    String news_content;
    String orgId;
    String filepath;

    public NewsCardBean() {
        this.news_icon = R.drawable.love;
        this.news_title = "";
        this.news_activity = "";
        this.news_address = "";
        this.news_date = "";
        this.news_deadline = "";
    }

    public static int getCardId() {
        return cardId;
    }

    public static String getCardClass() {
        return cardClass;
    }

    public int getNewsIcon() {
        return news_icon;
    }

    public void setNewsIcon(int news_icon) {
        this.news_icon = news_icon;
    }

    public String getNewsTitle() {
        return news_title;
    }

    public void setNewsTitle(String news_title) {
        this.news_title = news_title;
    }

    public String getNewsActivity() {
        return news_activity;
    }

    public void setNewsActivity(String news_activity) {
        this.news_activity = news_activity;
    }

    public String getNewsAddress() {
        return news_address;
    }

    public void setNewsAddress(String news_address) {
        this.news_address = news_address;
    }

    public String getNewsDate() {
        return news_date;
    }

    public void setNewsDate(String news_date) {
        this.news_date = news_date;
    }

    public String getNewsDeadline() {
        return news_deadline;
    }

    public void setNewsDeadline(String news_deadline) {
        this.news_deadline = news_deadline;
    }

    public String getNewsContent() {
        return news_content;
    }

    public void setNewsContent(String news_content) {
        this.news_content = news_content;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public void insertTo(CardHorizontalScrollView v) {
        ImageView news_icon = (ImageView) v.findViewById(R.id.news_icon);
        TextView news_title = (TextView) v.findViewById(R.id.news_title);
        TextView news_activity = (TextView) v.findViewById(R.id.news_activity);
        TextView news_address = (TextView) v.findViewById(R.id.news_address);
        TextView news_date = (TextView) v.findViewById(R.id.news_date);
        TextView news_deadline = (TextView) v.findViewById(R.id.news_deadline);

        news_icon.setImageResource(this.getNewsIcon());
        news_title.setText(this.getNewsTitle());
        news_activity.setText(this.getNewsActivity());
        news_address.setText(this.getNewsAddress());
        news_date.setText(this.getNewsDate());
        news_deadline.setText(this.getNewsDeadline());
    }
}

